forum

Home / DeveloperSection / Forums / display [no image found] when image src returns no image

display [no image found] when image src returns no image

Anonymous User240916-Jan-2015

I generate my image src from databse field called [pictureName]. I want when Picture name is null or the name doesn't return image to display [image not found] picture. 
Here is my aspx code to generate img:

<img src="WEBIMAGES/<%#Eval("BrandName")%>/<%# Eval("PictureName") %>" alt="" title="<%# Eval("ProductName") %>">

my images divided into folders for each brand. i have noImage.jpg in every folder. 
how to display this image when no image displayed. 
I'm using asp.net webforms 
I tried to use onerror event, but not working. 

Thanks in advance


Updated on 16-Jan-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By